<template>
  <div class="detial">
    <DetialHeader />
    <div class="main">
      <van-tabs v-model="active" @click="onClick">
        <van-tab title="点餐" name="goods"><Goods /></van-tab>
        <van-tab title="评价" name="ratings"><Ratings /></van-tab>
        <van-tab title="商家" name="info"><Info /></van-tab>
      </van-tabs>
    </div>
  </div>
</template>

<script>
import DetialHeader from '@/components/DetialHeader'
import Goods from './Goods'
import Info from './Info'
import Ratings from './Ratings'
export default {
  name: 'Detial',
  components: {
    DetialHeader,
    Goods,
    Info,
    Ratings
  },
  data () {
    return {
      active: 0
    }
  },
  methods: {
    onClick (name, title) {
      this.$router.replace(`/detial/${name}`).catch(() => {})
    }
  }
}
</script>

<style lang="less" scoped>

</style>
